local sk__huituo_active = fk.CreateSkill {

  name = "sk__huituo_active",

  tags = {},

}



sk__huituo_active:addEffect("active", {
  name = "sk__huituo_active",
  card_num = 0,
  target_num = 1,
  interaction = function(self, player)
    local choices, all_choices = {}, {}
    for i = 1, 4, 1 do
      table.insert(all_choices, "sk__huituo" .. i)
      if not table.contains(player:getTableMark("sk__huituo"), i) then
        table.insert(choices, "sk__huituo" .. i)
      end
    end
    return UI.ComboBox { choices = choices, all_choices = all_choices }
  end,
  card_filter = Util.FalseFunc,
  target_filter = function(self, player, to_select, selected, selected_cards)
    if #selected == 0 then
      local target = to_select
      if self.interaction.data == "sk__huituo1" then
        return target:isWounded()
      elseif self.interaction.data == "sk__huituo2" then
        return true
      elseif self.interaction.data == "sk__huituo3" then
        return target:hasEmptyEquipSlot()
      elseif self.interaction.data == "sk__huituo4" then
        return not target:hasSkill("sk__huituo", true)
      end
    end
  end,
})

return sk__huituo_active
